#include <stdio.h>
#define N 3
char str[80] = "aaaaAAAA   ^&*^*^45&";
int main() {
    int i = 0;
    int xiao = 0,da = 0 ,num = 0,space = 0,other = 0;
    while (str[i] != '\0'){
        if('a' <= str[i] && str[i] <= 'z'){
            xiao++;
        }
        else if('A' <= str[i] && str[i] <= 'Z'){
            da++;
        }
        else if('0' <= str[i] && str[i] <= '9'){
            num++;
        }
        else if(str[i] == ' '){
            space++;
        } else{
            other++;
        }
        i++;

    }
    printf("%d %d %d %d %d",xiao,da,space,num,other);
    return 0;
}